home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 5698 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.0 KB

  1. Path: lard.ftp.com!news-control
  2. From: nkamat@ftp.com (Ozmaniac)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Initialising structure members - help please!
  5. Date: 20 Feb 1996 22:13:42 GMT
  6. Organization: FTP Software
  7. Message-ID: <4gdh2m$sll@lard.ftp.com>
  8. References: <4gb8hn$3m8@news.mistral.co.uk>
  9. NNTP-Posting-Host: nkamat-2.ftp.com
  10. Mime-Version: 1.0
  11. X-Newsreader: WinVN 0.93.11
  12.  
  13. Try the inline suggestions:
  14. In article <4gb8hn$3m8@news.mistral.co.uk>, mikebarnard@mistral.co.uk says...
  15.  
  16. >struct  menuitem
  17. >        {
  18. >        int number;                     // Item 1, item 2 etc.
  19. >        char description[70];           // Room for a text description
  20. >        struct menuitem *next;          // Pointer to next menu item
  21. >        struct menuitem *last;          // Pointer to last menu item
  22. >        };
  23. >one.description = "1.   Calculate a minefield";
  24. strcpy(one.description, "1. Calc a minefield");    //be sure to include string.h
  25.  
  26. >one.next = two;
  27. one.next = &two;
  28.  
  29. >one.last = five;
  30. one.last = &five;
  31.  
  32. >Mic.
  33. >From windy Worthing; England.
  34. >mikebarnard@mistral.co.uk
  35. >
  36.  
  37.  
  38.